package com.zhangkunhao.notes.entity.Do;

import com.zhangkunhao.notes.annotation.TableField;
import com.zhangkunhao.notes.annotation.TableId;
import com.zhangkunhao.notes.annotation.TableName;


/**
 * 用户
 *
 * @author 20642
 */
@TableName(name = "tb_user")
public class User {
    @TableId(value = "id")
    private Integer id;
    private String email;
    private String password;
    /**
     * 封禁状态，0是被封禁，1是正常状态
     */
    @TableField(value = "activation_status")
    private Integer activationStatus;
    @TableField(value = "user_name")
    private String userName;
    private String gender;

    /**
     * 用户头像的url
     */
    @TableField(value = "image_path")
    private String imagePath;

    /**
     * 用户的关注者的数量
     */
    @TableField(value = "fans_count")
    private Integer fansCount;


    public User() {
        this.activationStatus = 1;
        this.userName = "匿名";
        this.gender = "未知";
        this.imagePath = "http://localhost:8080/demo01/uploads/0.jpg";
        this.fansCount = 0;
    }

    public User(Integer id, String email, String password, Integer activationStatus, String userName, String gender, String imagePath, Integer fansCount) {
        this.id = id;
        this.email = email;
        this.password = password;
        this.activationStatus = activationStatus;
        this.userName = userName;
        this.gender = gender;
        this.imagePath = imagePath;
        this.fansCount = fansCount;
    }

    /**
     * 获取
     *
     * @return id
     */
    public Integer getId() {
        return id;
    }

    /**
     * 设置
     *
     * @param id：
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取
     *
     * @return email
     */
    public String getEmail() {
        return email;
    }

    /**
     * 设置
     *
     * @param email：
     */
    public void setEmail(String email) {
        this.email = email;
    }

    /**
     * 获取
     *
     * @return password
     */
    public String getPassword() {
        return password;
    }

    /**
     * 设置
     *
     * @param password：
     */
    public void setPassword(String password) {
        this.password = password;
    }

    /**
     * 获取
     *
     * @return activationStatus
     */
    public Integer getActivationStatus() {
        return activationStatus;
    }

    /**
     * 设置
     *
     * @param activationStatus：
     */
    public void setActivationStatus(Integer activationStatus) {
        this.activationStatus = activationStatus;
    }

    /**
     * 获取
     *
     * @return userName
     */
    public String getUserName() {
        return userName;
    }

    /**
     * 设置
     *
     * @param userName：
     */
    public void setUserName(String userName) {
        this.userName = userName;
    }

    /**
     * 获取
     *
     * @return gender
     */
    public String getGender() {
        return gender;
    }

    /**
     * 设置
     *
     * @param gender：
     */
    public void setGender(String gender) {
        this.gender = gender;
    }

    /**
     * 获取
     *
     * @return imagePath
     */
    public String getImagePath() {
        return imagePath;
    }

    /**
     * 设置
     *
     * @param imagePath：
     */
    public void setImagePath(String imagePath) {
        this.imagePath = imagePath;
    }

    /**
     * 获取
     *
     * @return fansCount
     */
    public Integer getFansCount() {
        return fansCount;
    }

    /**
     * 设置
     *
     * @param fansCount：
     */
    public void setFansCount(Integer fansCount) {
        this.fansCount = fansCount;
    }

    @Override
    public String toString() {
        return "User{id = " + id + ", email = " + email + ", password = " + password + ", activationStatus = " + activationStatus + ", userName = " + userName + ", gender = " + gender + ", imagePath = " + imagePath + ", fansCount = " + fansCount + "}";
    }
}
